package com.guaoran.micro.services.spring.boot.starter.autoconfigurate;

import com.guaoran.micro.services.spring.boot.starter.GuaoranTemplate;
import com.guaoran.micro.services.spring.boot.starter.service.FormatProcessor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @Author gucheng
 * @Description 自定义自动配置文件
 * 2019-07-10 14:13
 */
@Configuration
@Import(FormatConfiguration.class)
@EnableConfigurationProperties(GuaoranProperties.class)
public class GuaoranAutoConfiguration {

    @Bean
    public GuaoranTemplate guaoranTemplate(FormatProcessor formatProcessor,GuaoranProperties guaoranProperties){
        return new GuaoranTemplate(formatProcessor,guaoranProperties);
    }
}
